// 定义银行账户类
class HHH {
    private String accountNumber;
    private String accountHolder;
    private double balance;

    // 构造函数，用于初始化账户信息
    public HHH(String accountNumber, String accountHolder, double initialBalance) {
        this.accountNumber = accountNumber;
        this.accountHolder = accountHolder;
        this.balance = initialBalance;
    }

    // 获取账户号码
    public String getAccountNumber() {
        return accountNumber;
    }

    // 获取账户持有人姓名
    public String getAccountHolder() {
        return accountHolder;
    }

    // 获取账户余额
    public double getBalance() {
        return balance;
    }

    // 取钱方法
    public boolean withdraw(double amount) {
        if (amount > 0 && amount <= balance) {
            balance -= amount;
            System.out.println("成功取出 " + amount + " 元，当前余额为 " + balance + " 元。");
            return true;
        } else {
            System.out.println("取款失败，可能是取款金额无效或余额不足。");
            return false;
        }
    }
}

// 主类，用于测试银行取钱功能
public class Main {
    public static void main(String[] args) {
        // 创建一个银行账户实例
        HHH account = new HHH("123456789", "张三", 1000.0);

        // 尝试取款 500 元
        account.withdraw(500.0);

        // 尝试取款 600 元，此时余额不足
        account.withdraw(600.0);
    }
}